public class Person {
    private String name; //必填
    private String idCard; //必填
    private String address; //选填
    private String education; //选填

    private Person(Builder builder) {
        this.name = builder.name;
        this.idCard = builder.idCard;
        this.address = builder.address;
        this.education = builder.education;
    }

    public static class Builder {
        private String name; //必填
        private String idCard; //必填
        private String address; //选填
        private String education; //选填

        public Builder(String name, String idCard) {
            this.name = name;
            this.idCard = idCard;
        }

        public void setAddress(String address) {
            this.address = address;
            return this;
        }
        public void setEducation(String education) {
            this.education = education;
            return this;
        }

        public Person build() {
            return new Person(this);
        }
    }

    public static void main(String[] args) {
        Person p = new Person.Builder("ych","210104xxx");
        System.out.println(p.toString());
    }

}